#!/bin/bash

# 文档编译脚本
# xelatex -file-line-error -interaction=nonstopmode -synctex=1  main.tex

for ((x=1; x<=$1; x++))
do
    echo "Running xelatex command for the $x time"
    xelatex -file-line-error -shell-escape -interaction=nonstopmode -synctex=1 -output-directory=out main.tex
done

echo "Done!"
